﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GtsServer.Common;
using GtsServer.DAL;
using GtsServer.Model;
using System.Data;

namespace GtsServer.Manage.Controller
{
    public class JournalController
    {
        JournalReportDAL dal = new JournalReportDAL();
        public List<JournalReportMould> GetList(int pageIndex, int pageSize,string potion, out int count, string strWhere)
        {
            count = 0;  
            List<JournalReportMould> list = new List<JournalReportMould>();
            DataSet ds = dal.GetList(pageIndex, pageSize, potion,strWhere);
            list = IListDataSet.DataSetToIList<JournalReportMould>(ds, 0).ToList();
            count = Convert.ToInt32(ds.Tables[1].Rows[0][0]);
            return list;
        }
        public List<PositionInfoModel> GetListBySelect()
        {
            List<PositionInfoModel> list = new List<PositionInfoModel>();
            DataSet ds = dal.GetListBySelect();
            list = IListDataSet.DataSetToIList<PositionInfoModel>(ds, 0).ToList();
            return list;
        }
    }
}
